import request from '@/utils/request'

/**
 * 获取自身考勤记录
 * @returns
 */
export function employeeAttendanceRecord() {
  return request({
    url: 'Attendance/employeeAttendanceRecord',
    method: 'post'
  })
}

/**
 * 上班考勤
 * @returns
 */
export function signIn() {
  return request({
    url: 'Attendance/signIn',
    method: 'post'
  })
}

/**
 * 下班签退
 * @returns
 */
export function signOut() {
  return request({
    url: 'Attendance/signOut',
    method: 'post'
  })
}

/**
 * 所有考勤统计
 * @returns
 */
export function getAll() {
  return request({
    url: 'Attendance/AttendanceRecordSelect',
    method: 'post',
    data: {}
  })
}

/**
 * 按条件查询考勤
 * @returns
 */
export function RecordSelect(attendance) {
  return request({
    url: 'Attendance/AttendanceRecordSelect',
    method: 'post',
    data: attendance
  })
}

/**
 * 补卡
 * @returns
 */
export function Supplementary(attendance) {
  return request({
    url: 'Attendance/Supplementary',
    method: 'post',
    data: attendance
  })
}

export function getAllController() {
  return request({
    url: 'Attendance/getControllers',
    method: 'post'
  })
}
